{include file="header.htm" /}
<body class="bodystyle">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page min-hg-c-50">
    <div class="flexigrid">
        <div class="hDiv mt50">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0" style="width: 100%">
                    <thead>
                    <tr>
                        <th abbr="article_title" axis="col3">
                            <div class="text-l10">活动名称</div>
                        </th>
                        <th abbr="" axis="col4" class="w120">
                            <div class="tc">活动状态</div>
                        </th>
                        <th abbr="" axis="col6" class="w280">
                            <div class="tc">活动时间</div>
                        </th>
                        <th abbr="" axis="col6" class="w200">
                            <div class="tc">活动类型</div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%">
                    <tbody>
                    {volist name="list" id="vo"}
                        <tr>
                            <td style="width: 100%;" class="">
                                <div class="text-l10">
                                    {$vo.activity_title}
                                </div>
                            </td>
                            <td>
                                <div class="w120 tc">
                                    {if condition="1 == $vo.status"}
                                    <span class="green">进行中</span>
                                    {elseif condition="2 == $vo.status"}
                                    <span class="green">未开始</span>
                                    {elseif condition="3 == $vo.status"}
                                    <span class="red" title="停止时间:{$vo.stop_time|MyDate='Y-m-d H:i:s',###}">手动停止</span>
                                    {elseif condition="4 == $vo.status"}
                                    <span class="red">已停止</span>
                                    {/if}
                                </div>
                            </td>
                            <td class="">
                                <div class="w280 tc">
                                    {$vo.start_time|MyDate='Y-m-d H:i:s',###} ~ {$vo.end_time|MyDate='Y-m-d H:i:s',###}
                                </div>
                            </td>
                            <td class="">
                                <div class="w200 tc">
                                    <!-- 需做判断 -->
                                    秒杀抢购
                                    <!-- 抽奖 -->
                                    <!-- 团购 -->
                                </div>
                            </td>
                        </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
    </div>
    <div class="bot3">
        <a href="javascript:void(0);" onclick="parent.layer.closeAll();" class="ncap-btn-big ncap-btn-green"><span>确认</span></a>
        <a class="ncap-btn-big ncap-btn-no" href="javascript:void(0);" onclick="parent.layer.closeAll();" title="关闭">关闭</a>
    </div>
</div>
  
<script>
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
        var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        //活动数据
        function relation(obj,title) {
            $.ajax({
                type : 'POST',
                url : "{:weapp_url('Seckill/Seckill/activity')}",
                data : {opt:'set', value:'', _ajax:1},
                dataType : 'json',
                success : function(res){
                    var url = $(obj).data('href');
                    var iframes = layer.open({
                        type: 2,
                        title: title,
                        id: 'relation_iframes',
                        fixed: true, //不固定
                        shadeClose: false,
                        closeBtn: 3,
                        shade: layer_shade,
                        area: ['90%', '90%'],
                        content: url,
                    });
                },
                error: function(e){
                    showErrorAlert(e.responseText);
                }
            });
        }
    });
</script>
{include file="footer.htm" /}
